package com.example.androidshixi;

import androidx.lifecycle.ViewModel;
import java.util.ArrayList;
import java.util.List;

public class ArticleViewModel extends ViewModel {
    private List<Article> articleList = new ArrayList<>();

    public List<Article> getArticleList() {
        return articleList;
    }

    public void addArticle(Article article) {
        if (article != null) {
            articleList.add(article);
        }
    }
}